
#pragma once
#include <ArduinoJson.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266WiFi.h>
#include <WiFiClientSecureBearSSL.h>
#include "HttpsGetUtils.h"

extern int meteoconIcon;

typedef struct HeFengCurrentData {
  String cond_txt;
  int fl;
  int tmp;
  int hum;
  String wind_sc;
  int iconMeteoCon;
  uint32_t follower;
  bool Weather_Statue;
  bool Bilibili_Statue;
}HeFengCurrentData;

typedef struct HeFengForeData {
  String datestr;
  int tmp_min;
  int tmp_max;
  uint32_t iconMeteoCon;
  bool Weather_Statue_t;
}HeFengForeData;

class HeFeng {
  private:
    int getMeteoconIcon(uint32_t cond_code);
  public:
    HeFeng();
    bool doUpdateCurr(HeFengCurrentData *data, String key, String location);
    bool doUpdateFore(HeFengForeData *data, String key, String location);
    bool fans(HeFengCurrentData *data, String id);
};


